package com.king.modules.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.king.framework.base.domain.YyBaseEntity;

/**
 * 用户和角色关联 sys_user_role
 * 
 * @author king
 */
@TableName("sys_user_role")
public class SysUserRoleEntity extends YyBaseEntity {
	/** 用户ID */
	private Long userId;

	/** 角色ID */
	private Long roleId;
	

	@TableField(exist = false)
	private String roleKey;
	
	@TableField(exist = false)
	private String roleName;
	

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	public String getRoleKey() {
		return roleKey;
	}

	public void setRoleKey(String roleKey) {
		this.roleKey = roleKey;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("userId", getUserId())
				.append("roleId", getRoleId()).toString();
	}
}
